<script setup>
// 这里得到的 count 是可读可写的
const count = defineModel('numb', { required: true, type: Number })
const message = defineModel('msg')
</script>

<template>
  <h3>MyCounter 组件 --- {{ count }}</h3>
  <button @click="count++">+1</button>
  <button @click="count--">-1</button>

  <hr />
  <input type="text" v-model="message" />
</template>
